//
//  SelfInfoEditViewCell.m
//  iphone-graph
//
//  Created by yuzhuo on 2016/12/27.
//  Copyright © 2016年 yzapp. All rights reserved.
//

#import "SelfInfoEditViewCell.h"
#import "UIColor+Util.h"
#import "Constant.h"

@implementation SelfInfoEditViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self  = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self){
        self.accessoryType = UITableViewCellAccessoryNone;//
        [self initSubViews];
    }
    return self;
}

-(void)initSubViews{
    UIFont *font_14 = [UIFont systemFontOfSize:14];
    UIFont *font_21 = [UIFont systemFontOfSize:21];
    _titelLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, 60, font_14.lineHeight)];
    _titelLabel.textColor = [UIColor colorWithHexString:@"#888888"];
    _titelLabel.font = font_14;
    _textField = [[UITextField alloc] initWithFrame:CGRectMake(20, 40+font_14.lineHeight, SCREEN_WIDTH-40, 50)];
    _textField.textColor = [UIColor colorWithHexString:@"#4A4A4A"];
    _textField.font = font_21;
    _textField.clearButtonMode=UITextFieldViewModeWhileEditing;
    _textField.autocorrectionType = UITextAutocorrectionTypeNo;
    [self.contentView addSubview:_titelLabel];
    [self.contentView addSubview:_textField];
    
}

#pragma mark -SetData

-(void)setTitle:(NSString*)title
{
    _title = title;
    self.titelLabel.text = title;
    
}

-(void)setName:(NSString *)name
{
    _name = name;
    self.textField.text = name;
    
}


@end
